//用户相关接口
import request from '@/utils/request'
import type { loginForm, loginResponse, userInfoResponse } from './type'
enum API {
  LOGIN_URL = '/admin/acl/index/login',
  USERINFO_URL = '/admin/acl/index/info',
  LOGOUT_URL = '/admin/acl/index/logout',
}

export const reLogin = (data: loginForm) =>
  request.post<any, loginResponse>(API.LOGIN_URL, data)

export const reUserInfo = () => request.get<any, any>(API.USERINFO_URL)

export const reLogout = () => {
  request.post(API.LOGOUT_URL)
}
